The present invention relates to image enhancement, and more particularly, to a method and apparatus for enhancing the quality of an image by compensating a color signal in response to a luminance variation or adjustment due to mean matching histogram equalization and quantized mean matching histogram equalization.
The basic operation of histogram equalization is to transform a given input image on the basis of its histogram, wherein the histogram represents the density of a gray level distribution of an input image. The histogram of the gray level distribution provides an overall depiction of the appearance of an image. A gray level properly controlled according to a sample distribution of an image enhances the appearance or contrast of the image.
Among various methods for contrast enhancement, histogram equalization is widely known and has been disclosed in the following documents: [1] J. S. Lim, "Two-Dimensional Signal and Image Processing," Prentice Hall, Englewood Cliffs, N.J., 1990; and [2] R. C. Gonzalez and P. Wints, "Digital Image Processing," Addison-Wesley, Reading, Mass., 1977.
The well-known characteristics of histogram equalization act as a defect in some practical cases. For example, since the output density of histogram equalization is constant, the mean brightness of an output image approaches a middle gray level. As a result, the mean brightness of an output image in histogram equalization is exactly the middle gray level regardless of the mean brightness of the input image. This characteristic is not desirable for certain applications such as in photographed night scenes. Because the histogram equalization provides an output at the middle region of the gray levels, a scene photographed at night appears extremely bright after histogram equalization.
Additionally, if color compensation is not performed on a color signal according to a luminance variation produced by histogram equalization, a pure color signal is distorted.
For instance, in a color system that is composed of signals Y, R-Y and B-Y, it is assumed that the signal Y is; transformed into a signal Y' (=Y+.DELTA.y) by a predetermined luminance processing. The adjusted signals Y', R-Y and B-Y are varied into values R, G and B without color compensation, and the resultant color signals are expressed by Equations (1) through (3): ##EQU1##
When Y is transformed into Y', an exemplary pure red signal (R,0,0) is mapped to a signal (R+.DELTA.y, .DELTA.y, .DELTA.y) if there is no color compensation. Thus, the resultant color signal is no longer a pure red signal. Similarly, if there is no color compensation, all of the other pure color signals are also distorted.
Meanwhile, a contrast correction method for extracting Y from input color signals R, G and B, extracting a correction signal from the extracted Y, and adding th.e correction signal to the respective input signals R, G and B as shown in Equations (1) through (3), has been disclosed in an U.S. Pat. No. 5,345,277. Even in the above-described patent document, a pure color signal is distorted.